<%@ page import="iorder.Customer" %>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'firstName', 'error')} ">
	<label for="firstName">
		<g:message code="customer.firstName.label" default="First Name" />
		
	</label>
	<g:textField name="firstName" value="${customerInstance?.firstName}"/>
</div>
</p>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'surname', 'error')} ">
	<label for="surname">
		<g:message code="customer.surname.label" default="Surname" />
		
	</label>
	<g:textField name="surname" value="${customerInstance?.surname}"/>
</div>
</p>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'dob', 'error')} required">
	<label for="dob">
		<g:message code="customer.dob.label" default="Dob" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dob" precision="day"  value="${customerInstance?.dob}"  />
</div>
</p>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="customer.email.label" default="Email" />
		
	</label>
	<g:textField name="email" value="${customerInstance?.email}"/>
</div>
</p>

  
<g:render template='address' model="['addressInstance':customerInstance.address]"/>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'facebookUrl', 'error')} ">
	<label for="facebookUrl">
		<g:message code="customer.facebookUrl.label" default="Facebook Url" />
		
	</label>
	<g:textField name="facebookUrl" value="${customerInstance?.facebookUrl}"/>
</div>
</p>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'mobile', 'error')} ">
	<label for="mobile">
		<g:message code="customer.mobile.label" default="Mobile" />
		
	</label>
	<g:textField name="mobile" value="${customerInstance?.mobile}"/>
</div>
</p>

<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'phone', 'error')} ">
	<label for="phone">
		<g:message code="customer.phone.label" default="Phone" />
		
	</label>
	<g:textField name="phone" value="${customerInstance?.phone}"/>
</div>
</p>

<!--<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'photoUrl', 'error')} ">
	<label for="photoUrl">
		<g:message code="customer.photoUrl.label" default="Photo Url" />
		
	</label>
	<g:textField name="photoUrl" value="${customerInstance?.photoUrl}"/>
</div>
</p>
-->
<p>
<div class="fieldcontain ${hasErrors(bean: customerInstance, field: 'twitterUrl', 'error')} ">
	<label for="twitterUrl">
		<g:message code="customer.twitterUrl.label" default="Twitter Url" />
		
	</label>
	<g:textField name="twitterUrl" value="${customerInstance?.twitterUrl}"/>
</div>

</p>

